package org.dallasrowing.logbook.util;

import java.sql.Connection;
import java.sql.DriverManager;

import org.dallasrowing.logbook.Config;

public class DBConnector {

	public static Connection getConnection()
	{
		Connection con = null;
		try
		{
			Class.forName(Config.getDriver()).newInstance();
			con = DriverManager.getConnection(
					Config.getJdbcUrl(), 
					Config.getJdbcUsername(), 
					Config.getJdbcPassword());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		return con;
	}
}
